package cn.fsd.service;

import cn.fsd.domain.Order;
import cn.fsd.domain.Storeroom;
import cn.fsd.query.dispatch.TransferQuery;
import cn.fsd.query.storeroom.TaskQuery;
import cn.fsd.vo.storeroom.TransferInfoVO;
import cn.fsd.vo.storeroom.transfer.DistributeInfoVO;
import cn.fsd.vo.storeroom.transfer.TransferOutInfoVO;
import cn.fsd.vo.storeroom.deliveryOut.TaskTransferCommodityVO;
import cn.fsd.vo.storeroom.exchange.checkIn.TaskRecordCommodityVO;
import cn.fsd.vo.storeroom.exchange.out.TaskCommodityVO;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;


@Service
public interface StoreRoomService {


    Integer getMaxLimitation(String storeroom_id, String commodity_id);

    Boolean checkStockOut(String storeroom_id, String commodity_id,Integer commodity_num);

    Boolean checkStockOutByStoreroomId(String storeroom_id, String commodity_id, Integer commodity_num);
    void stockOutOP(Order order);

    void cancelOrder(Order order);

    void handle(Order order);


    Storeroom getInfo(String storeroom_id);

    PageInfo<TransferOutInfoVO> getTransferOutInfo(TransferQuery transferQuery);

    PageInfo<DistributeInfoVO> getDistributeInfo(TransferQuery transferQuery);

    PageInfo<TaskTransferCommodityVO> findDeliveryOut(TaskQuery query);

    PageInfo<TaskRecordCommodityVO> findExchangeCheckIn(TaskQuery taskQuery);
    PageInfo<TaskCommodityVO> findExchangeOut(TaskQuery taskQuery);

    PageInfo<TaskCommodityVO> findExchangeIn(TaskQuery taskQuery);

    PageInfo<TaskCommodityVO> findExchangeCenter(TaskQuery taskQuery);

    void beginExchange(String order_id);

    TransferInfoVO findTransferById(String transfer_id);
}
